﻿using FileData.Currency;
using FileData.Currency.TypeConvert;
using FileData.DataUtils.ViewUtils;
using FileData.Utils.Currency;
using FileData.Utils.Currency.FileUtils;
using FileData.ViewManger;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace FileData
{
    public partial class MainWindows : Form
    {
        public MainWindows()
        {
            InitializeComponent();
            new FloderHelper().InitFloder();
            InitView();
        }

        private void InitView()
        {
            comboBox1.Items.AddRange(new string[] { "规则辅助", "文件辅助", "文本替换" });
            comboBox1.SelectedIndex = 2;
            new ViewRep().AutoSelect(groupBox1, comboBox1.Text);
        }

        private void button1_Click(object sender, EventArgs e)
        {
            new FloderHelper().OpenFloder(".\\");
        }

        private void button2_Click(object sender, EventArgs e)
        {
            //new HtmlHelper().RemoveEmptyLable(new DataTool().CreateVirtualCloudDirverContent() + "<div></div>");

            var html =
        @"<!DOCTYPE html>
<html>
<body>
	<h1>This is <b>bold</b> heading</h1>
	<p>This is <u>underlined</u> paragraph</p>
	<h2>This is <i>italic</i> heading</h2>
	<h2>This is new heading</h2>
" + "<div><p></p></div><li><li><img src=\"\"><img src=\"\"><img src=\"https://img.alicdn.com\" class=\"img-ks-lazyload\" >  </body></html> ";
            //new DataTool().CreateVirtualCloudDirverContent() + "<div></div>"
            Console.WriteLine(new HtmlHelper().ClearContentAuto(html));
        }

        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            new ViewRep().AutoSelect(groupBox1, comboBox1.Text);
        }
    }
}